package com.mgface.springcloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author wanyuxiang
 * @version 1.0
 * @project springcloudCollection
 * @create 2018-08-16 10:41
 **/
@RestController
public class SayController {
    @Autowired
    private RestTemplate restTemplate;
    @GetMapping("/say")
    public String say() {
        return restTemplate.getForObject("http://Service/hello?param=cloud", String.class);
    }
}
